
#define POS_INF 1.0/0
#define NEG_INF -1.0/0

#include "IA.h"

class Interval {
public:
	double a,b;
	Interval(double, double);
	static Interval& Create(double, double);
	Interval& set(double, double);
	Interval& set(double);
	Interval& set(const Interval&);
	Interval& operator+=(double);
	Interval& operator-=(double);
	Interval& operator*=(double);
	Interval& operator/=(double);
	Interval& operator^=(double);
	Interval& operator%=(double);
	Interval& operator+=(const Interval&);
	Interval& operator-=(const Interval&);
	Interval& operator*=(const Interval&);
	Interval& operator/=(const Interval&);
	Interval& operator^=(const Interval&);
	Interval& operator%=(const Interval&);
	Interval operator+(double);
	Interval operator-(double);
	Interval operator*(double);
	Interval operator/(double);
	Interval operator^(double);
	Interval operator%(double);
	Interval operator+(const Interval&);
	Interval operator-(const Interval&);
	Interval operator*(const Interval&);
	Interval operator/(const Interval&);
	Interval operator^(const Interval&);
	Interval operator%(const Interval&);
	Interval& _sin();
	Interval& _cos();
	Interval& _abs();
	Interval& _negative();
	Interval sin();
	Interval cos();
	Interval abs();
	Interval negative();
	bool contains(double value);
private:
	static void FourMM(double, double, double, double, double&, double&);
}; 
